<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::get('/', function () {
    return view('welcome');
});

//api
$api = app('Dingo\Api\Routing\Router');
$api->version('apiv1', function ($api) {
    $api->get('/a',function (){
        return json_encode('1');
    });
});

//错误日志
$api->version('adminv1',["namespace" => "App\Http\Admin\Controllers"],function ($api){

    $api->post('save_error_logger','ExtendController@SaveErrorLogger');
});
